<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Literal interpolation example</title>
    <script src="../../../node_modules/vue/dist/vue.global.js"></script>
    <script src="../../../packages/vue-i18n/dist/vue-i18n.global.js"></script>
  </head>
  <body>
    <div id="app">
      <form>
        <label for="locale-select">{{ $t('message.language') }}</label>
        <select id="locale-select" v-model="$i18n.locale">
          <option value="en">en</option>
          <option value="ja">ja</option>
        </select>
      </form>
      <p>{{ $t('message.greeting') }}</p>
    </div>
    <script>
      const { createApp } = Vue
      const { createI18n } = VueI18n

      const i18n = createI18n({
        locale: 'ja',
        messages: {
          en: {
            message: {
              language: 'Language',
              greeting: "Hello, {'kazupon'}!"
            }
          },
          ja: {
            message: {
              language: '言語',
              greeting: "こんにちは、{'かずぽん'}！"
            }
          }
        }
      })

      const app = createApp({})
      app.use(i18n)
      app.mount('#app')
    </script>
  </body>
</html>
